import service from "./request.js";

export default {
  // 修改角色
  update(query) {
    return service({
      method: "PUT",
      url: "/admin-api/system/role/update",
      data: query,
    });
  },
  // 创建角色
  create(query) {
    return service({
      method: "POST",
      url: "/admin-api/system/role/create",
      data: query,
    });
  },
  // 获得角色分页
  page(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/role/page",
      params: query,
    });
  },
  // 获取角色精简信息列表
  roleList(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/role/list-all",
      params: query,
    });
  },
  // 获得角色信息
  get(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/role/get",
      params: query,
    });
  },
  // 删除角色
  delete(query) {
    return service({
      method: "DELETE",
      url: "/admin-api/system/role/delete",
      params: query,
    });
  },
};
